<template>
  <el-menu-item v-show="data?.empty.status" :index="'/index/'+data?.empty.path" @click="addWindows('/index/'+data?.empty.path,data?.empty.title)">
    <el-icon><component :is="data?.empty.icon"/></el-icon>
    <template #title>
      <menu-text>{{data.empty.title}}</menu-text>
    </template>
  </el-menu-item>
</template>
<script setup lang="ts">
import {sys} from "../../model/system";
import MenuText from "./MenuText.vue";
import {type} from "../../model/type";
import {useWindowsStore} from "../../store/windows";
import {useLeftToolStore} from "../../store/leftTool";
const windowLabels=useWindowsStore()
const tool=useLeftToolStore()
const props=defineProps({
  data:sys.MenuEmpty
})

function addWindows(path,title){
  let win=new type.WindowLabel(path,title,0,true)
  windowLabels.UpdateWindow(win)
}

</script>

<style scoped>

</style>